You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > WeibullFit Method > Statistics.WeibullFit Method ([In] TVec, out double, out double, double[], double[], int, double, double)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.WeibullFit Method ([In] TVec, out double, out double, double[], double[], int, double, double)

Calculate parameters for Weibull distributed values.

Syntax
C#
Visual Basic
public static void WeibullFit([In] TVec X, out double A, out double B, ref double[] PCIA, ref double[] PCIB, int MaxIter, double Tolerance, double Alpha);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be Weibull distributed. 
out double A 
Return Weibull distribution parameter estimator A. 
out double B 
Return Weibull distribution parameter estimator B. 
ref double[] PCIA 
A (1-Alpha)*100 percent confidence interval. 
ref double[] PCIB 
B (1-Alpha)*100 percent confidence interval. 
int MaxIter 
Maximum number of iterations needed for deriving a and b. 
double Tolerance 
Defines the acceptable tolerance for calculating a and b. 
double Alpha 
Confidence interval percentage. 

RandomWeibull, WeibullStat

The following example generates 1000 random Weibull distributed values and then uses WeibullFit routine to extract used a and b parameters

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(1000,false); // first, generate 1000 randomly gamma distributed // numbers with parameters a=0.5 and b =1.2 StatRandom.RandomWeibull(0.5,1.2,vec1,-1); // Now extract the a,b and their 95% confidence intervals. // Use at max 400 iterations and tolerance 0.0001 double resA, resB; double[] CIA = new double[2]; double[] CIB = new double[2]; Statistics.WeibullFit(vec1,out resA,out resB,out CIA,out CIB,400,1e-4,0.05); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!